
$(document).ready(function(){
    
    createUncheckedSelector();
    
    /*$('table tbody tr td a').each(function() {
        var anchor = $(this);
        anchor.parent().parent().click(function() {
            window.location.href = anchor.attr('href');
        }).mouseover(function() {
            $(this).css('cursor', 'pointer');
        });
    });
    */
 // adiciona mascara ao CPF
   $('#cpf').mask('999.999.999-99')
 
   
    $.dpText = {
    		TEXT_PREV_YEAR		:	'Ano anterior',
    		TEXT_PREV_MONTH		:	'Mês anterior',
    		TEXT_NEXT_YEAR		:	'Ano seguinte',
    		TEXT_NEXT_MONTH		:	'Mês seguinte',
    		TEXT_CLOSE			:	'Fechar',
    		TEXT_CHOOSE_DATE	:	'Escolher'
    	};
    	$('.datepicker').datePicker().trigger('change');
    	
    $(".datepicker").mask("99/99/9999");
})

function checkAllRows(id, checked) {
    var selector = (checked == true) ? ':unchecked' : ':checked';
    $('input[name=' + id + ']' + selector).click();
}

function createUncheckedSelector() {
    jQuery.extend(jQuery.expr[':'], {
        unchecked: function(element) {
            return ('checkbox' === element.type || 'radio' === element.type) && !element.checked;
        }
    });
}


